<?php 
if(!isset($_SESSION)) 
{ 
session_start(); 
} 

if (isset($_SESSION['s_users']) and is_array($_SESSION['s_users']) and isset($_REQUEST['pageNum']) and isset($_REQUEST['rows_per_page']) and isset($_REQUEST['number_of_page'])) {
	
	
	$mylist = $_SESSION['s_users'];
	
	$pageNum = $_REQUEST['pageNum'];
	$rows_per_page = $_REQUEST['rows_per_page'];
	$pageend = $pageNum*$rows_per_page;
	$pagestart = $pageend - $rows_per_page;
	$index = 0;
	$real = 0;
	foreach ($mylist as $key =>$row){
		$index+=1;
		//$mylist[$index] = array($row[logDatetime],$row[UserID],$row[dtStart],$row[dtEnd],$row[carType],$row[carnum],$row[isReg]);				 
		if ($index<=$pagestart) {
			continue;
		}elseif ($index > $pageend){
			break;
		}
		else{$real++;
		
		//array_push($mylist, array($row[logDate],$row[logTime],$row[szUser],$row[iMode]));
					 ?>
					 <tr>
					 	<td width="25%"><?=$row[0]?></td>
					 	<td width="25%"><?=$row[1]?></td>
					 	<td width="25%"><?=$row[2]?></td>
					 	<td width="25%"  class="last"><?=$row[3]?></td>
					 </tr> 
	<?php  }
		}
			 if ($real>0 and $real<18) {
			 	foreach(range(0,18-$real) as $i){
			 		?>
			 		<tr>
				 	<td width="25%">&nbsp;</td>
				 	<td width="25%">&nbsp;</td>
				 	<td width="25%">&nbsp;</td>
				 	<td width="25%"  class="last">&nbsp;</td>
				 	</tr>
			 	<?php }
			 }
		
		
}
?>

